<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<title>FLDCMS后台管理系统</title>
<meta name="keywords" content="FLDCMS，FLDCMS后台管理系统">
<meta name="description" content="FLDCMS，是一款由FLD开发的轻量级扁平化网站后台模板，适合中小型CMS后台系统。">
{include file="public/header" /}
<style>
	img[nc_type="flex"]{cursor:pointer;}
</style>
</head>
<body>
<nav class="breadcrumb">
	<i class="Hui-iconfont">&#xe67f;</i> 首页
	{notempty name="$node_info.p_title"}
	<span class="c-gray en">&gt;</span>
		{$node_info.p_title}
	{/notempty}
	{notempty name="$node_info.node_title"}
	<span class="c-gray en">&gt;</span>
		{$node_info.node_title}
	{/notempty}
	<a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" >
		<i class="Hui-iconfont">&#xe68f;</i>
	</a>
</nav>
<div class="page-container">
	{containstr name=":session('act_list')" value="Node_add"}
	<div class="cl pd-5 bg-1 bk-gray">
		<span class="l">
			<a class="btn btn-primary radius" data-title="添加节点" onclick="layer_open('添加节点','{:url('node/add')}')" href="javascript:;">
				<i class="Hui-iconfont"></i> 添加节点
			</a>
		</span>
	</div>
	{/containstr}
	<!-- 
	<div class="text-l">
		<input type="text" name="keyword" id="keyword" placeholder=" 关键字" style="width:250px" class="input-text">
		<button name="" id="" class="btn btn-success" type="submit"><i class="Hui-iconfont">&#xe665;</i> 查询</button>
	</div>
	 -->
	<div class="mt-20">
		<table class="table table-border table-bordered table-bg table-hover table-sort" id="table_menu">
			<thead>
				<tr class="text-c">
					<th width="20"></th>
					<th width="100">菜单名称</th>
					<th width="100">模块名</th>
					<th width="100">方法名</th>
					<th width="75">菜单或节点</th>
					<th width="75">状态</th>
					<th width="50">排序</th>
					<th width="200">操作</th>
				</tr>
			</thead>
			<tbody>
				{foreach name="list" item="vo"}
				<tr class="text-c">
					<td>
						{if condition="$vo.c_count gt 0"}
							<img fieldid="{$vo.node_id}" status="open" nc_type="flex" src="__STATIC__/images/admin/tv-expandable.gif">
						{/if}
					</td>
					<td class="text-l">{$vo.node_title}</td>
					<td class="text-c">{$vo.node_controll}</td>
					<td class="text-c">{$vo.node_action}</td>
					<td>
						{if condition="$vo.is_menu eq '1'"}
							<span class="label label-success radius">菜单</span>
						{else}
							<span class="label label-danger radius">节点</span>
						{/if}
					</td>
					<td>
						{if condition="$vo.status eq '1'"}
							<span class="label label-success radius">显示</span>
						{else}
							<span class="label label-danger radius">隐藏</span>
						{/if}
					</td>
					<td>{$vo.sort}</td>
					<td class="f-14 td-manage"> 
						{containstr name=":session('act_list')" value="Node_edit"}
						<a style="text-decoration:none" class="ml-5" onclick="layer_open('编辑后台菜单','{:Url('/Node/edit/node_id/'.$vo['node_id'])}')" href="javascript:;" title="编辑"><i class="Hui-iconfont">&#xe6df;</i></a> 
						{/containstr}
						{containstr name=":session('act_list')" value="Node_delete"}
						<a style="text-decoration:none" class="ml-5" onClick="table_del(this,'{$vo.node_id}')" href="javascript:;" title="删除"><i class="Hui-iconfont">&#xe6e2;</i></a>
						{/containstr}
					</td>
				</tr>
				{/foreach}
			</tbody>
		</table>
	</div>
</div>
{include file="public/footer" /}
<script type="text/javascript" src="__STATIC__/admin/js/jquery.menu.js"></script>
<script type="text/javascript">
/*删除*/
function table_del(obj,id){
	layer.confirm('确认要删除吗？',function(index){
		$.ajax({  
            type : "POST",  //提交方式  
            url : "{:url('node/delete')}",//路径  
            data : { "node_id" : id },
            async:false, 
            success : function(result) {
                if (result.error == 0) {  
                	$(obj).parents("tr").remove();
                	layer.msg('删除成功!', {icon: 1,time: 1000}, function(){
                		location.reload();
            		});
                } else { 
                    layer.msg('删除失败!',{icon:0,time:1000});
                }  
            },
            error: function (data) {
				alert("操作失败");
			}  
        }); 
	});
}

</script>
</body>
</html>